package com.laolang.ssh.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;


@Entity
@Table(name="book_type")
public class BookType implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public BookType() {
		super();
	}

	public BookType(String typeName, String typeDesc, String typeFamily, boolean typeValid) {
		super();
		this.typeName = typeName;
		this.typeDesc = typeDesc;
		this.typeFamily = typeFamily;
		this.typeValid = typeValid;
	}

	@Override
	public String toString() {
		return "BookType [id=" + id + ", typeName=" + typeName + ", typeDesc=" + typeDesc + ", typeFamily=" + typeFamily + ", typeValid=" + typeValid
				+ ", version=" + version + "]";
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getTypeDesc() {
		return typeDesc;
	}

	public void setTypeDesc(String typeDesc) {
		this.typeDesc = typeDesc;
	}

	public String getTypeFamily() {
		return typeFamily;
	}

	public void setTypeFamily(String typeFamily) {
		this.typeFamily = typeFamily;
	}

	public boolean isTypeValid() {
		return typeValid;
	}

	public void setTypeValid(boolean typeValid) {
		this.typeValid = typeValid;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Id
	@GeneratedValue
	private Integer id;

	@Column(name="type_name",unique=true)
	private String typeName;

	@Column(name="type_desc")
	private String typeDesc;

	@Column(name="type_family")
	private String typeFamily;

	@Column(name="type_valid")
	private boolean typeValid;

	@Version
	private Integer version;

}
